<%-------------------------------------------------------------------
 * 页面名称：mob_active.jsp
 * 功能描述：激活手机绑定
 * Action  : 
 *
 *-------------------------------------------------------------------
--%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ page import="cn.agiledata.bank.common.util.WeatherUtil"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-bean.tld" prefix="bean"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="ipb" uri="/WEB-INF/conf/tld/ipb.tld"%>
<%@ taglib prefix="ad" uri="agiledata"%>
<%
	String path = request.getContextPath();
	String mobile = WeatherUtil.getAccountByEmail(
			WeatherUtil.getLoingInfoFromSession(request).getAccount()
			.getEmail()).getMobile();
	if (mobile == null)
		mobile = "";
%>
<script language="javascript">
			function submitProcess() {
				if(document.getElementById("mobile").value == ""){
					alert("手机号码不能为空！");
					return false;
				}
				if(document.getElementById("mobcode").value == ""){
					alert("确认码不能为空！");
					return false;
				}
				if (document.all.form1.mobile.value.search(/^(13[0-9]{9}|159[0-9]{8}|158[0-9]{8})$/) == -1){
					alert("手机格式不正确");
					document.getElementById("mobile").value = "";
					return false;
				}
				if(document.getElementById("mobcode").value.length < 8) {
					alert("确认码不能小于8位！");
					document.getElementById("mobcode").value = "";
					return false;
				}

				document.all.form1.submit();
			}
			function resendver(){
				if(document.getElementById("vericode").value == ""){
					alert("校验码不能为空！");
					return false;
				}
				if(document.getElementById("vericode").value.length != 4) {
					alert("校验码必须等于4位！");
					document.getElementById("vericode").value = "";
					return false;
				}
				//alert("已经重新发送了一条确认短信到您注册的手机中，请耐心等待！");
				document.all.form2.submit();
			}
			var i = 20;//需要禁止的时间
			function unload(){
			if(document.getElementById("rebutton").value!=""){
			}
				if(i>0){
					document.getElementById("rebutton").value = i--+"秒后可点击";
					document.getElementById("rebutton").disabled = "disabled";
					var timer = setTimeout("unload()",1000);
			}else{
					document.getElementById("rebutton").value = "重发绑定手机的确认码";
					document.getElementById("rebutton").disabled = "";
				}
			}
			function back(){
				window.location.href(""); 
			}
</script>
<div id="main">
	<div class="content_right">
		<div style="width:745px;margin-left:10px;">
			<div class="titleinfo">
				激活手机绑定
			</div>
			<div class="edit_pass">
				<table width="100%" border="0" align="center" cellpadding="5"
					cellspacing="1">
					<form action="<%=path%>/page/myspace/mobileCheck.do" name="form1"
						method="post">
					<tr>
						<td height="55" colspan="2" class="font_blue">
							<span class="orangefont14b"> 如果您已经获得了绑定该手机号码的激活码，请进行下面的操作：
							</span>
						</td>
					</tr>
					<tr>
						<td width="22%" align="right">
							<span class="orang12b">*</span>您的手机号码：
						</td>
						<td width="78%" class="font_blue">
							<input name="mobile" id="mobile" alt="手机号码" maxlength="255"
								class="inputStyle" value="<%=mobile%>" />
						</td>
					</tr>
					<tr>
						<td align="right">
							<span class="orang12b">*</span> 收到的激活码：
						</td>
						<td class="font_blue">
							<input name="mobcode" id="mobcode" alt="激活码" maxlength="255"
								class="inputStyle" />
							<a href="#" onclick="submitProcess();" class="dropblue14b">激活绑定手机</a>
						</td>
					</tr>
					</form>
					<form action="<%=path%>/page/myspace/reSend.do" name="form2"
						method="post">
					<tr>
						<td align="right">
							&nbsp;
						</td>
						<td class="font_blue">
						<table width="100%" border="0" align="center" cellpadding="7"
										cellspacing="1" bgcolor="#f9e277" style="margin:10px 0;">
										<tr>
											<td bgcolor="#fffdf5">
												<table width="100%" border="0" cellpadding="3"
													cellspacing="0">
													<tr>
														<td width="3%" height="25" valign="top"
															style="border-bottom:1px solid #ccc;"></td>
														<td width="97%" align="left" class="red12b"
															style="border-bottom:1px solid #ccc;">
															特别提醒
														</td>
													</tr>
											<tr>
												<td valign="top">
													&nbsp;
												</td>
												<td align="left" class="font_gray">
													如果您在
													<span class="redColor12px">20</span>秒内没有收到手机绑定的激活码
													<span class="text9green">请申请重发</span>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td align="right">
							&nbsp;
						</td>
						<td class="font_blue">
							<span class="orang12b">申请重发：</span>
							<br />
							<input name="vericode" id="vericode" alt="校验码" maxlength="255"
								size="6" class="inputStyle" />
							<img src="<%=path%>/page/util/verifyImage.jsp" width="58"
								height="20" align="absmiddle" />
							<a href="#" onclick="resendver();" class="dropblue14b">重发确认码</a>
						</td>
					</tr>
					<tr>
						<td height="55" align="right">
							&nbsp;
						</td>
						<td class="font_blue">
							<input name="button" type="button" class="button_style"
								onclick="loading('<%=path%>/route.do?modual=space$account');"
								value="返 回" />
						</td>
					</tr>
					</form>
				</table>
			</div>
		</div>
	</div>
</div>
